<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/components/APP/Device/Elevator/Page.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\..\index.html">All files</a> / <a href="index.html">src/components/APP/Device/Elevator</a> Page.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/40</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/14</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/12</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/40</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
  &lt;div o-Container o-Container-App&gt;
    &lt;van-nav-bar title="电梯" left-arrow @click-left="onClickLeft" v-bind="{fixed:true}"/&gt;
    &lt;div class="content"&gt;
      &lt;div class="containerMask"&gt;&lt;/div&gt;
      &lt;div class="build"&gt;
        &lt;van-tabs v-model="active" title-active-color="#0089FF" color="#0089FF" title-inactive-color="#0F0F0F" swipeable&gt;
          &lt;van-tab v-for="(item,index) in buildData" :key="index"&gt;
            &lt;div class="tab-title" slot="title" @click="building(item.ID)"&gt;{{ item.Name }}&lt;/div&gt;
          &lt;/van-tab&gt;
        &lt;/van-tabs&gt;
      &lt;/div&gt;
      &lt;div class="BigBox"&gt;
        &lt;div class="box" v-for="(item,index) in floorMsg" :key="index"&gt;
          &lt;div class="title111"&gt;&lt;span class="icon icon-louceng2"&gt;&lt;/span&gt;{{item.Name}}电梯系统运行监控&lt;/div&gt;
          &lt;div class="smallBox"&gt;
            &lt;div class="tu tu1" :style="{backgroundImage: 'url(' + url[index].url + ')'}"&gt;
              &lt;span v-for="(itm,ind) in elevatorMsg" :key="ind" v-if="itm.FloorID === item.ID" :style="{left: itm.XAxis + '%', top: itm.YAxis + '%','background': (itm.IfOnline == 1 ? '#00B600':'#585858')}" v-show="item.IfOnline === 1"&gt;开启&lt;/span&gt;
              &lt;span v-for="(itm,ind) in elevatorMsg" :key="ind" v-if="itm.FloorID === item.ID" :style="{left: itm.XAxis + '%', top: itm.YAxis + '%','background': (itm.IfOnline == 1 ? '#00B600':'#585858')}" v-show="item.IfOnline === 0"&gt;离线&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  export default {
    name: "mms_engine_database_item", /* 这个name暂时不知道用啥用，根据官方文档说的是方便排错的 */
<span class="fstat-no" title="function not covered" >    data() {</span>
<span class="cstat-no" title="statement not covered" >      return {</span>
          octopus: this.$parent.octopus,
          active:null,
          buildData:null,
          buildIndex:null,
          floorMsg:null,
          floorIndex:null,
          FloorIndex:null,
          elevatorMsg:null,
          ifOnline:null,
          XAxis:null,
          YAxis:null,
          newArr:[],
          cadMsg:null,
          url:'',
      }
    },
<span class="fstat-no" title="function not covered" >    created(){</span>
        //楼的数据源
<span class="cstat-no" title="statement not covered" >        this.buildNum()</span>
    },
    methods: {
<span class="fstat-no" title="function not covered" >        onClickLeft() {</span>
<span class="cstat-no" title="statement not covered" >            this.octopus.router.jump('/APP/Main/Home/Page')</span>
        },
<span class="fstat-no" title="function not covered" >        building(buildid){</span>
            //重新赋值buildid
<span class="cstat-no" title="statement not covered" >            this.buildIndex=buildid;</span>
<span class="cstat-no" title="statement not covered" >            this.floorNum();</span>
<span class="cstat-no" title="statement not covered" >            this.elevatorSelt();</span>
        },
        // 楼的数据源
<span class="fstat-no" title="function not covered" >        buildNum(){</span>
<span class="cstat-no" title="statement not covered" >            let that = this;</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            this.octopus.request.api.post("/Octopus/Engine/List", {</span></span>
                    id:2,
                    value: this.octopus.passport.project,
                    cellData: [
                        {name: "ID"},
                        {name: "ProjectID",filterKey:"=",filterValue:this.octopus.passport.project},
                        {name:"Name"}
                    ],
                },
                function(data){
<span class="cstat-no" title="statement not covered" >                    if(data.status.code ==200){</span>
<span class="cstat-no" title="statement not covered" >                        that.buildData=(data.content.queryData);</span>
<span class="cstat-no" title="statement not covered" >                        that.buildIndex = data.content.queryData[0].ID;</span>
<span class="cstat-no" title="statement not covered" >                        that.elevatorSelt();</span>
<span class="cstat-no" title="statement not covered" >                        that.floorNum();</span>
                    }
                }
            )
        },
        //楼层的数据源
<span class="fstat-no" title="function not covered" >        floorNum(){</span>
<span class="cstat-no" title="statement not covered" >            let that = this;</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            this.octopus.request.api.post("/Octopus/Engine/List", {</span></span>
                    id: 83,
                    value: this.octopus.passport.project,
                    cellData: [
                        {name:"FloorIndex"},
                        {name:'ID'},
                        {name:'Name'},
                        {name:'FloorPlanData'},
                        {name: "BuildingID",filterKey : "=",filterValue : that.buildIndex},
                        {name: "ProjectID",filterKey:"=",filterValue:this.octopus.passport.project},
                    ],
                },
                function(data){
<span class="cstat-no" title="statement not covered" >                    if(data.status.code ==200){</span>
<span class="cstat-no" title="statement not covered" >                        let arr = (data.content.queryData);</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                        arr.sort(function (a, b) {</span></span>
<span class="cstat-no" title="statement not covered" >                            return a.FloorIndex &gt; b.FloorIndex ? 1 : -1;</span>
                        });
<span class="cstat-no" title="statement not covered" >                        let b = [];</span>
<span class="cstat-no" title="statement not covered" >                        let n = [];</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                        arr.map((item,index)=&gt;{</span></span>
<span class="cstat-no" title="statement not covered" >                            n = JSON.parse(item.FloorPlanData)</span>
<span class="cstat-no" title="statement not covered" >                            if(n){</span>
<span class="cstat-no" title="statement not covered" >                                b.push(n[0])</span>
                            }
                        });
<span class="cstat-no" title="statement not covered" >                        if(b.length &lt; 1){</span>
<span class="cstat-no" title="statement not covered" >                            for(let i=0; i&lt;arr.length;i++){</span>
<span class="cstat-no" title="statement not covered" >                                b.push({url : "../../../../../static/skin/default/APP/Device/Elevator/Page/img/dianti_none.png"})</span>
                            }
                        }else {
<span class="cstat-no" title="statement not covered" >                            b = b;</span>
                        };
<span class="cstat-no" title="statement not covered" >                        that.floorIndex = arr[0].ID;</span>
<span class="cstat-no" title="statement not covered" >                        that.floorMsg = (arr);</span>
<span class="cstat-no" title="statement not covered" >                        that.url = b;</span>
                    }
                }
            )
        },
        //电梯数据源
<span class="fstat-no" title="function not covered" >        elevatorSelt(){</span>
<span class="cstat-no" title="statement not covered" >            let that = this;</span>
<span class="cstat-no" title="statement not covered" >            let lastHour = new Date(new Date().getTime() - 1 * 60 * 60 * 1000);</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            this.octopus.request.api.post("/Octopus/Engine/List", {</span></span>
                    id: 152,
                    value: this.octopus.passport.project,
                    cellData: [
                        {name:"XAxis"},
                        {name:'YAxis'},
                        {name:'IfOnline'},
                        {name:'LastUploadTime'},
                        {name:'Power'},
                        {name:'SensorName'},
                        {name: "BuildingID",filterKey : "=",filterValue : that.buildIndex},
                        {name: "FloorID"},
                        {name: "Year",filterKey : "=",filterValue : lastHour.getFullYear()},
                        {name: "Month",filterKey : "=",filterValue : lastHour.getMonth()+1},
                        {name: "Day",filterKey : "=",filterValue : lastHour.getDate()},
                        {name: "Hour",filterKey : "=",filterValue : lastHour.getHours()},
                    ],
                },
                function(data){
<span class="cstat-no" title="statement not covered" >                    if(data.status.code ==200 &amp;&amp; data.content.queryData.length&gt;0){</span>
<span class="cstat-no" title="statement not covered" >                        that.elevatorMsg = (data.content.queryData);</span>
<span class="cstat-no" title="statement not covered" >                        that.ifOnline = that.elevatorMsg[0].ifOnline;</span>
<span class="cstat-no" title="statement not covered" >                        console.log(311111111111)</span>
<span class="cstat-no" title="statement not covered" >                        console.log(elevatorMsg)</span>
                    }
                }
            )
        }
    },
    props: ["oData"]
  }
&lt;/script&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 20 2020 17:54:15 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\..\sorter.js"></script>
</body>
</html>
